package maple.thelittleredbook.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import maple.thelittleredbook.user.entity.UserProfile;

/**
 * 用户画像Mapper接口
 */
@Mapper
public interface UserProfileMapper extends BaseMapper<UserProfile> {

    /**
     * 根据用户ID查询用户画像
     * @param userId 用户ID
     * @return 用户画像对象
     */
    @Select("SELECT * FROM user_profiles WHERE user_id = #{userId}")
    UserProfile selectByUserId(@Param("userId") Long userId);
}